package io.github.springsongs.service;

import io.github.springsongs.entities.CommonResult;
import io.github.springsongs.entities.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {
    @PostMapping(value = "/payment/create")
    public CommonResult create(@RequestBody Payment payment);
    @GetMapping("/payment/{id}")
    public CommonResult<Payment> getPaymentbyId(@PathVariable("id") Long id);
}
